<%@ Page Language="C#" MasterPageFile="~/NoMenu.master" AutoEventWireup="true" CodeFile="Gateway.aspx.cs" Inherits="Gateway" Title="Gateway" Theme="Gateway" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <script type="text/javascript">
        function valDob(sender, e)
        {
            var year = document.getElementById("<%=year.ClientID%>");
            var month = document.getElementById("<%=month.ClientID%>");
            var day = document.getElementById("<%=day.ClientID%>");
            var dob = new Date();
            dob.setDate(1);
            dob.setFullYear(year.value);
            dob.setMonth(month.value - 1);
            dob.setDate(day.value);
            if(dob.getFullYear() != year.value || dob.getMonth() + 1 != month.value || dob.getDate() != day.value)
            {
                e.IsValid = false;
            }
            else    
            {
                e.IsValid = true;
            }
            
        }
    </script>
    <asp:Panel ID="pnlInput" Visible="true" DefaultButton="Button1" runat="server">
		<h1>Welcome to Inspired Luxury</h1>
		<p>WE ARE COMMITTED TO <asp:HyperLink ID="HyperLink4" runat="server" NavigateUrl="~/popUp/responsibleDrinking.html" Target="_blank">RESPONSIBLE DRINKING </asp:HyperLink>AND THEREFORE NEED TO ASK THESE QUESTIONS. THIS INFORMATION WILL NOT BE USED TO 													CONTACT YOU IN ANY WAY.</p>
		<p style="font-size:1.3em; font-weight:bold; margin-bottom:0px; color:#dbe1ad">Please enter your date of birth and the country you are in:</p>
		<div class="dropDown">
		<asp:DropDownList ID="day" AppendDataBoundItems="true" runat="server">
		    <asp:ListItem Text="dd" Value=""/>
		</asp:DropDownList> 
		<asp:DropDownList ID="month" AppendDataBoundItems="true" runat="server">
		    <asp:ListItem Text="mm" Value=""/>
		</asp:DropDownList>
		<asp:DropDownList ID="year" AppendDataBoundItems="true" runat="server">
		    <asp:ListItem Text="yyyy" Value="" />
		</asp:DropDownList>
		<asp:DropDownList ID="country" runat="server" AppendDataBoundItems="true" DataSourceID="dsCounrties" DataTextField="name" DataValueField="name">
		    <asp:ListItem Text="Country" Value=""/>
		</asp:DropDownList>
		</div>
		<div class="errors" style="float:right;">
		    <asp:CustomValidator ID="valDOB" ErrorMessage="<span class='error' style='display:block'>*Invalid Date Of Birth</span>" ValidationGroup="AgeCheck" OnServerValidate="valDOB_ServerValidate"  ClientValidationFunction="valDob" runat="server" />
		    <asp:RequiredFieldValidator ID="valCountry" ErrorMessage="<span class='error'  style='display:block'>*Please enter your country</span>" ValidationGroup="AgeCheck" ControlToValidate="country" Display="Dynamic" runat="server" />
		</div>
		<div class="twoCol">
			<div class="left">
				<asp:CheckBox ID="cbRember" Text="" runat="server" />
		  	</div>
			  
			<div class="right">
				<p style="padding:0px; margin:0px">REMEMBER THESE DETAILS FOR FUTURE VISITS?<br />
				[Do not tick if this is a shared computer]</p>
			</div>
		</div>
		<div style="clear:both"></div>
		<asp:imageButton ImageUrl="~/img/enter_btn.gif" ID="Button1"  runat="server" OnClick="Button1_Click" ValidationGroup="AgeCheck" Text="Submit" />
        <asp:XmlDataSource ID="dsCounrties" DataFile="~/Gateway.xml" EnableCaching="true" CacheDuration="Infinite" runat="server" />

		<p>PLEASE DO NOT ENTER THIS SITE IF YOU ARE NOT OF LEGAL PURCHASE AGE FOR ALCOHOL IN YOUR COUNTRY OF ACCESS.</p>
			
			<p>BY CLICKING THE LINK YOU ACCEPT OUR <asp:HyperLink ID="termsAndConditionsPU" runat="server" NavigateUrl="~/popUp/termsAndConditions.html" Target="_blank">TERMS AND CONDITIONS</asp:HyperLink> AND <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/popUp/privacy.html" Target="_blank">PRIVACY STATEMENT</asp:HyperLink></p>
			<p><asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="~/popUp/why.html" Target="_blank">WHY </asp:HyperLink>DO WE NEED TO ASK THESE QUESTIONS?</p>
			<p><asp:HyperLink ID="HyperLink3" runat="server" NavigateUrl="http://www.KNOWYOURDIAGEODRINK.COM" Target="_blank">KNOW YOUR DIAGEO DRINK</asp:HyperLink></p>
    </asp:Panel>
    <asp:Panel ID="pnlTooYoung" Visible="false" runat="server">
       <h1>No Access</h1>
    </asp:Panel>
</asp:Content>

